package cn.handy.web.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hanshuai
 * @Description: {}
 * @date 2019/3/26 16:11
 */
@RefreshScope
@RestController
public class TestController {
    @Value("${age}")
    private String age;

    /**
     * 获取配置文件中的age
     * @return
     */
    @RequestMapping("/getAge")
    public String getAge(){
        return age;
    }
}
